	class WordCount
	{
	public:
	WordCount()
	{
		this->fileName = "";
		this->characterNum = this->wordNum = 0;
	}
	WordCount(string s)
	{
		this->fileName = s;
		this->characterNum = this->wordNum = 0;
	}
	int Countchar(fstream& in, fstream &out);
	int Countword(fstream& in, fstream &out);
	int Countline(fstream& in, fstream &out);
	void Sortmap(fstream &out);
	string fileName;
	int characterNum;
	int wordNum;
	map<string, int> wMap;
	};
    
        in.unsetf(ios_base::skipws);//设置不跳过换行符和空白符
	in >> tempCh;
	while (!in.eof())
	{
		totalCount++;
		in >> tempCh;
	}
 
         map<string, int>::iterator it = this->wMap.find(wordString);
	if (it != this->wMap.end())
	{
			it->second++;
	}
	else
	{
			this->wMap.insert(pair<string, int>(wordString, 1));
	}
	wordString = "";
 
    	//通过find函数判断单词是否在map容器中出现过，若出现过则增加迭代器返回的指针的值既单词次数即可，未出现过则加入新的元素。
        map<string, int>::iterator it = this->wMap.find(wordString);
	if (it != this->wMap.end())
	{
			it->second++;
	}
	else
	{
			this->wMap.insert(pair<string, int>(wordString, 1));
	}
	wordString = "";

            in >> temp;
	if (temp <= 'Z'&&temp >= 'A')//如果字符为大写字母将其转换为小写字母
	{
		temp += 32;
	}
	if (!(isalpha(temp)||isdigit(temp)))//判断是否遇到分割符，是则执行以下条件
	{
		if (wordString.length() < 4)//如果单词长度小于4，则直接跳过并清除字符串内容
		{
			wordString = "";
			continue;
		}
		for (int i = 0;i < 4;i++)
		{
			if (!isalpha(wordString[i]))//判断字符串前四位是否为字母，不为字母则直接结束循环
			{
				wordString = "";
				isWord = false;
				break;
			}
		}
		if (!isWord)//如果不为单词则继续执行下一个while循环，不执行以下代码
		{
			isWord = true;
			continue;
	        }

